home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
language
/
c68_443b.lzh
/
SRC
/
P_C68_44.443
< prev
Wrap
Text File
|
1994-08-04
|
39KB
|
1,472 lines
diff -c src/analyze.c c68/analyze.c
*** src/analyze.c Wed Jun 15 15:50:23 1994
--- c68/analyze.c Sat Jul 30 11:28:44 1994
***************
*** 465,470 ****
--- 465,477 ----
if (csp->voidf || (csp->exp->nodetype == en_icon &&
csp->exp->v.i < 16 && csp->exp->v.i >= 0))
return 0;
+ #ifdef __TOS__
+ if ( trap_option && csp->exp->nodetype == en_nacon &&
+ ( csp->exp->v.sp == gemdos_name ||
+ csp->exp->v.sp == xbios_name ||
+ csp->exp->v.sp == bios_name ) )
+ return 0;
+ #endif /* __TOS__ */
if (is_lvalue(csp->exp))
return 2 * csp->uses;
return csp->uses;
***************
*** 478,488 ****
CSE **lst;
{
CSE *csp1, *csp2;
csp1 = *lst;
if (csp1 == 0 || csp1->next == 0)
return;
bsort(&(csp1->next));
! while (csp1 != 0 && (csp2 = csp1->next) != 0 && desire(csp1) < desire(csp2)) {
*lst = csp2;
csp1->next = csp2->next;
csp2->next = csp1;
--- 485,498 ----
CSE **lst;
{
CSE *csp1, *csp2;
+ int d1;
+
csp1 = *lst;
if (csp1 == 0 || csp1->next == 0)
return;
bsort(&(csp1->next));
! d1 = desire(csp1);
! while (csp1 != 0 && (csp2 = csp1->next) != 0 && d1 < desire(csp2)) {
*lst = csp2;
csp1->next = csp2->next;
csp2->next = csp1;
diff -c src/cglbdec.h c68/cglbdec.h
*** src/cglbdec.h Wed Jun 15 15:50:23 1994
--- c68/cglbdec.h Sun Jul 31 07:33:42 1994
***************
*** 38,43 ****
--- 38,48 ----
extern int lstrlen; /* length of the value in laststr */
extern unsigned long ival;
extern char *alloca_name; /* pointer to the name alloca */
+ #ifdef __TOS__
+ extern char *gemdos_name; /* pointer to the names gemdos, */
+ extern char *xbios_name; /* xbios and bios */
+ extern char *bios_name;
+ #endif /* __TOS__ */
#ifdef FLOAT_SUPPORT
extern double rval;
#endif /* FLOAT_SUPPORT */
***************
*** 97,102 ****
--- 102,110 ----
#ifdef TRACE
extern BOOL trace_option; /* generate trace code */
#endif /* TRACE */
+ #ifdef __TOS__
+ extern BOOL trap_option; /* generate traps for gemdos, xbios and bios */
+ #endif /* __TOS__ */
extern int max_error_count; /* maximum number of errors before stopping */
extern TYP *ret_type;
diff -c src/cglbdef.c c68/cglbdef.c
*** src/cglbdef.c Wed Jun 15 15:50:23 1994
--- c68/cglbdef.c Sun Jul 31 07:32:56 1994
***************
*** 43,48 ****
--- 43,53 ----
int lstrlen;
unsigned long ival;
char *alloca_name;
+ #ifdef __TOS__
+ char *gemdos_name;
+ char *xbios_name;
+ char *bios_name;
+ #endif /* __TOS__ */
#ifdef FLOAT_SUPPORT
double rval;
#endif /* FLOAT_SUPPORT */
***************
*** 117,122 ****
--- 122,130 ----
#ifdef TRACE
BOOL trace_option = 0;
#endif
+ #ifdef __TOS__
+ BOOL trap_option = 1;
+ #endif /* __TOS__ */
#ifdef PROBES
BOOL probe_option = 0;
#endif /* PROBES */
diff -c src/chdr.h c68/chdr.h
*** src/chdr.h Wed Jun 15 15:50:31 1994
--- c68/chdr.h Sun Jul 17 06:10:34 1994
***************
*** 462,468 ****
*
* For text of message types see the 'msgout.c' module
*
! * It is EXTREMELY important that the order of this
* enum statement is kept consistent with the table
* of messages in 'msgout.c'
*/
--- 462,468 ----
*
* For text of message types see the 'msgout.c' module
*
! * It is EXTREMELY important that the order of this
* enum statement is kept consistent with the table
* of messages in 'msgout.c'
*/
***************
*** 570,576 ****
#define WARN_LEVEL2 WARN_AUTOINIT
WARN_AUTOINIT,
WARN_NOHEX,
- WARN_PARAMSIZE,
WARN_REDEFINE,
WARN_SIZEOF0,
WARN_SIZEOFBIG,
--- 570,575 ----
***************
*** 592,598 ****
/*
* Level 4
* Warnings at this level are often encountered when porting
! * code, but are quite likely not be an error.
*/
#define WARN_LEVEL4 WARN_0TYPEDEF
WARN_0TYPEDEF,
--- 591,597 ----
/*
* Level 4
* Warnings at this level are often encountered when porting
! * code, but are quite likely not to be an error.
*/
#define WARN_LEVEL4 WARN_0TYPEDEF
WARN_0TYPEDEF,
***************
*** 605,610 ****
--- 604,610 ----
WARN_HIDE,
WARN_IMPLICIT,
WARN_NOTKANDR,
+ WARN_PARAMSIZE,
WARN_NOTREACHED,
WARN_PROTOTYPE,
WARN_PROMOTE,
diff -c src/cmain.c c68/cmain.c
*** src/cmain.c Wed Jun 15 15:50:24 1994
--- c68/cmain.c Sun Jul 31 07:32:58 1994
***************
*** 41,46 ****
--- 41,50 ----
#undef P_
+ #ifdef __MINT__
+ long _stksize = -1L;
+ #endif
+
static void
exception(sig)
int sig;
***************
*** 55,61 ****
#endif
#endif
! main(argc, argv)
int argc;
char **argv;
{
--- 59,65 ----
#endif
#endif
! int main(argc, argv)
int argc;
char **argv;
{
***************
*** 221,226 ****
--- 225,233 ----
#ifdef TRACE
{"trace", invert, &trace_option, NULL},
#endif /* TRACE */
+ #ifdef __TOS__
+ {"trap", invert, &trap_option, NULL},
+ #endif /* __TOS__ */
{"trad", invert, &trad_option, NULL},
{"trans", invert, &trans_option, NULL},
{"uchar", invert, &uchar_option, NULL},
***************
*** 364,383 ****
if ((input = fopen(*argv, "r")) == NULL) {
message(MSG_OPENFILE,*argv,message_text(MSG_INPUT));
exit(2);
! }
VOIDCAST strcpy(act_file,*argv);
}
argv++;
if (argc > 1)
/* used named file instead of stdout */
! if ((output = fopen(*argv, "w")) == NULL) {
message(MSG_OPENFILE,*argv,message_text(MSG_OUTPUT));
exit(2);
}
argv++;
if (argc > 2)
/* used named listing file instead of stderr */
! if ((listfile = fopen(*argv, "w")) == NULL) {
message(MSG_OPENFILE,*argv,message_text(MSG_LISTING));
exit(2);
}
--- 371,390 ----
if ((input = fopen(*argv, "r")) == NULL) {
message(MSG_OPENFILE,*argv,message_text(MSG_INPUT));
exit(2);
! }
VOIDCAST strcpy(act_file,*argv);
}
argv++;
if (argc > 1)
/* used named file instead of stdout */
! if ((output = fopen(*argv, "wb")) == NULL) {
message(MSG_OPENFILE,*argv,message_text(MSG_OUTPUT));
exit(2);
}
argv++;
if (argc > 2)
/* used named listing file instead of stderr */
! if ((listfile = fopen(*argv, "wb")) == NULL) {
message(MSG_OPENFILE,*argv,message_text(MSG_LISTING));
exit(2);
}
diff -c src/config.c68 c68/config.c68
*** src/config.c68 Wed Jun 15 15:50:24 1994
--- c68/config.c68 Sun Jul 31 03:37:26 1994
***************
*** 79,86 ****
#undef MC68020 /* This is an 68020 compiler */
#undef MC68030 /* This is an 68030 compiler */
! #define TARGET_ACK /* Generate ACK assembler output */
! #undef TARGET_CPM /* Generate DRI assembler output */
#undef TARGET_GAS /* Generate GAS assembler output */
#undef TARGET_QMAC /* Generate QMAC assembler output */
--- 79,86 ----
#undef MC68020 /* This is an 68020 compiler */
#undef MC68030 /* This is an 68030 compiler */
! #undef TARGET_ACK /* Generate ACK assembler output */
! #define TARGET_CPM /* Generate DRI assembler output */
#undef TARGET_GAS /* Generate GAS assembler output */
#undef TARGET_QMAC /* Generate QMAC assembler output */
***************
*** 90,97 ****
* of ACK has this bug fixed, then in some cases slightly more
* efficient code is generated if you comment out this option
*/
! #define MOVEMBUG /* Assembler has problems in MOVEM */
! #define CMP_BUG /* Assembler has problems in CMP */
#define RELOC_BUG /* Assembler has problems with Label1-Label2 */
/*
--- 90,97 ----
* of ACK has this bug fixed, then in some cases slightly more
* efficient code is generated if you comment out this option
*/
! #undef MOVEMBUG /* Assembler has problems in MOVEM */
! #undef CMP_BUG /* Assembler has problems in CMP */
#define RELOC_BUG /* Assembler has problems with Label1-Label2 */
/*
***************
*** 138,144 ****
* Ensure that the setting is compatible with the value defined in your
* library and header files.
*/
! #define TP_SIZE tp_uint /* size_t type; either tp_uint or tp_ulong */
/*
* Many K&R compilers have as